;--- include file created by h2incx v0.99.11, copyright 2005 japheth
;--- source file: c:\programme\devstudio\vc6\include\WINSOCK2.H, last modified: 4/24/1998 0:0

ifndef _WINSOCK2API_
_WINSOCK2API_	EQU	<>
_WINSOCKAPI_	EQU	<>

if not defined(WIN32) and not defined(_WIN64)
	include pshpack4.inc
endif

ifndef INCL_WINSOCK_API_PROTOTYPES
INCL_WINSOCK_API_PROTOTYPES	EQU	1
endif 
ifndef INCL_WINSOCK_API_TYPEDEFS
INCL_WINSOCK_API_TYPEDEFS	EQU	0
endif 
ifndef _INC_WINDOWS
	include windows.inc
endif 
if  0 eq defined(MAKEWORD)
MAKEWORD macro low,high
	exitm <( ( low )  or  ( ( high )  shl  8 ) ) ) >
	endm
endif 

ifndef WINSOCK_VERSION
WINSOCK_VERSION	EQU	<MAKEWORD ( 2 , 2 )>
endif 

ifndef WINSOCK_API_LINKAGE
ifdef DECLSPEC_IMPORT
WINSOCK_API_LINKAGE	EQU	<DECLSPEC_IMPORT>
else 
WINSOCK_API_LINKAGE	EQU	<>
endif 
endif 

ifdef __cplusplus
;extern "C"
;{
endif 

u_char typedef BYTE
u_short typedef WORD
u_int typedef DWORD
u_long typedef DWORD
SOCKET typedef u_int

ifndef FD_SETSIZE
FD_SETSIZE	EQU	64
endif 

fd_set	struct 
fd_count	u_int	?
fd_array	SOCKET FD_SETSIZE dup (?)
fd_set	ends

__WSAFDIsSet proto WINSTDCALLCONV :SOCKET, :ptr fd_set

FD_CLR macro fd,set
;	exitm <do { u_int __i ; for ( __i = 0 ; __i < ( ( fd_set FAR * ) ( set ) ) -> fd_count ; __i + + ) { if ( ( ( fd_set FAR * ) ( set ) ) -> fd_array [ __i ] == fd ) { while ( __i < ( ( fd_set FAR * ) ( set ) ) -> fd_count - 1 ) { ( ( fd_set FAR * ) ( set ) ) -> fd_array [ __i ] = ( ( fd_set FAR * ) ( set ) ) -> fd_array [ __i + 1 ] ; __i + + ; } ( ( fd_set FAR * ) ( set ) ) -> fd_count - - ; break ; } } } while ( 0 ) >
ifdef _WIN64
	push rbx
	push rsi
	push rdi
	lea rbx, set
	mov eax, fd
	mov ecx, [rbx].fd_set.fd_count
	lea rsi, [rbx].fd_set.fd_array
	mov rdi, rsi
	.while (ecx)
		.if (eax == [rsi])
			dec [rbx].fd_set.fd_count
			add rsi, 4
		.endif
		movsd
		dec ecx
	.endw
	pop rdi
	pop rsi
	pop rbx
else
	pushad
	lea ebx, set
	mov eax, fd
	mov ecx, [ebx].fd_set.fd_count
	lea esi, [ebx].fd_set.fd_array
	mov edi, esi
	.while (ecx)
		.if (eax == [esi])
			dec [ebx].fd_set.fd_count
			add esi, 4
		.endif
		movsd
		dec ecx
	.endw
	popad
endif
	endm

if 1
FD_SET macro fd,set
;	exitm <do { u_int __i ; for ( __i = 0 ; __i < ( ( fd_set FAR * ) ( set ) ) -> fd_count ; __i + + ) { if ( ( ( fd_set FAR * ) ( set ) ) -> fd_array [ __i ] == ( fd ) ) { break ; } } if ( __i == ( ( fd_set FAR * ) ( set ) ) -> fd_count ) { if ( ( ( fd_set FAR * ) ( set ) ) -> fd_count < FD_SETSIZE ) { ( ( fd_set FAR * ) ( set ) ) -> fd_array [ __i ] = ( fd ) ; ( ( fd_set FAR * ) ( set ) ) -> fd_count + + ; } } } while ( 0 ) >
ifdef _WIN64
	lea rdx, set
	mov eax, fd
	mov ecx, [rdx].fd_set.fd_count
	.if (ecx < FD_SETSIZE)
		mov [rdx].fd_set.fd_array[ecx*4],eax
		inc [rdx].fd_set.fd_count
	.endif
else
	lea edx, set
	mov eax, fd
	mov ecx, [edx].fd_set.fd_count
	.if (ecx < FD_SETSIZE)
		mov [edx].fd_set.fd_array[ecx*4],eax
		inc [edx].fd_set.fd_count
	.endif
endif
	endm
endif

FD_ZERO macro set
;	exitm <( ( ( fd_set FAR * ) ( set ) ) -> fd_count = 0 ) >
ifdef _WIN64
	lea rax, set
	mov [rax].fd_set.fd_count, 0
else
	lea eax, set
	mov [eax].fd_set.fd_count, 0
endif
	endm

FD_ISSET macro fd,set
;	exitm <__WSAFDIsSet ( ( SOCKET ) ( fd ) , ( fd_set FAR * ) ( set ) ) >
	exitm <invoke __WSAFDIsSet, fd , addr set >
	endm

timeval	struct 
tv_sec	SDWORD	?
tv_usec	SDWORD	?
timeval	ends

timerisset macro tvp
	exitm <( ( tvp ) -> tv_sec || ( tvp ) -> tv_usec ) >
	endm
timercmp macro tvp,uvp,cmp
	exitm <( ( tvp ) -> tv_sec cmp ( uvp ) -> tv_sec || ( tvp ) -> tv_sec == ( uvp ) -> tv_sec && ( tvp ) -> tv_usec cmp ( uvp ) -> tv_usec ) >
	endm
timerclear macro tvp
	exitm <( tvp ) -> tv_sec = ( tvp ) -> tv_usec = 0 >
	endm
IOCPARM_MASK	EQU	7fh
IOC_VOID	EQU	20000000h
IOC_OUT	EQU	40000000h
IOC_IN	EQU	80000000h
IOC_INOUT	EQU	( IOC_IN  or  IOC_OUT )
_IO macro x,y
	exitm <( IOC_VOID  or  ( ( x )  shl  8 )  or  ( y ) ) >
	endm
_IOR macro x,y,t
	exitm <( IOC_OUT  or  ( ( sizeof ( t )  and  IOCPARM_MASK )  shl  16 )  or  ( ( x )  shl  8 )  or  ( y ) ) >
	endm
_IOW macro x,y,t
	exitm <( IOC_IN  or  ( ( sizeof ( t )  and  IOCPARM_MASK )  shl  16 )  or  ( ( x )  shl  8 )  or  ( y ) ) >
	endm
FIONREAD	EQU	<_IOR ( 'f' , 127 , u_long )>
FIONBIO	EQU	<_IOW ( 'f' , 126 , u_long )>
FIOASYNC	EQU	<_IOW ( 'f' , 125 , u_long )>
SIOCSHIWAT	EQU	<_IOW ( 's' , 0 , u_long )>
SIOCGHIWAT	EQU	<_IOR ( 's' , 1 , u_long )>
SIOCSLOWAT	EQU	<_IOW ( 's' , 2 , u_long )>
SIOCGLOWAT	EQU	<_IOR ( 's' , 3 , u_long )>
SIOCATMARK	EQU	<_IOR ( 's' , 7 , u_long )>

hostent	struct 
h_name	LPSTR	?
h_aliases	LPVOID	?
h_addrtype	SWORD	?
h_length	SWORD	?
h_addr_list	LPVOID	?
h_addr	EQU	<h_addr_list [ 0 ]>
hostent	ends

netent	struct 
n_name	LPSTR	?
n_aliases	LPSTR	?
n_addrtype	SWORD	?
n_net	u_long	?
netent	ends

servent	struct 
s_name	LPSTR	?
s_aliases	LPSTR	?
ifdef _WIN64
s_proto	LPSTR	?
s_port	SWORD	?
else
s_port	SWORD	?
s_proto	LPSTR	?
endif
servent	ends

protoent	struct 
p_name	LPSTR	?
p_aliases	LPVOID	?
p_proto	SWORD	?
protoent	ends

IPPROTO_IP	EQU	0
IPPROTO_ICMP	EQU	1
IPPROTO_IGMP	EQU	2
IPPROTO_GGP	EQU	3
IPPROTO_TCP	EQU	6
IPPROTO_PUP	EQU	12
IPPROTO_UDP	EQU	17
IPPROTO_IDP	EQU	22
IPPROTO_ND	EQU	77
IPPROTO_RAW	EQU	255
IPPROTO_MAX	EQU	256
IPPORT_ECHO	EQU	7
IPPORT_DISCARD	EQU	9
IPPORT_SYSTAT	EQU	11
IPPORT_DAYTIME	EQU	13
IPPORT_NETSTAT	EQU	15
IPPORT_FTP	EQU	21
IPPORT_TELNET	EQU	23
IPPORT_SMTP	EQU	25
IPPORT_TIMESERVER	EQU	37
IPPORT_NAMESERVER	EQU	42
IPPORT_WHOIS	EQU	43
IPPORT_MTP	EQU	57
IPPORT_TFTP	EQU	69
IPPORT_RJE	EQU	77
IPPORT_FINGER	EQU	79
IPPORT_TTYLINK	EQU	87
IPPORT_SUPDUP	EQU	95
IPPORT_EXECSERVER	EQU	512
IPPORT_LOGINSERVER	EQU	513
IPPORT_CMDSERVER	EQU	514
IPPORT_EFSSERVER	EQU	520
IPPORT_BIFFUDP	EQU	512
IPPORT_WHOSERVER	EQU	513
IPPORT_ROUTESERVER	EQU	520
IPPORT_RESERVED	EQU	1024
IMPLINK_IP	EQU	155
IMPLINK_LOWEXPER	EQU	156
IMPLINK_HIGHEXPER	EQU	158

in_addr	struct 
union S_un
struct S_un_b
s_b1	u_char	?
s_b2	u_char	?
s_b3	u_char	?
s_b4	u_char	?
ends
struct S_un_w
s_w1	u_short	?
s_w2	u_short	?
ends
S_addr	u_long	?
ends
s_addr	EQU	<S_un.S_addr>
s_host	EQU	<S_un.S_un_b.s_b2>
s_net	EQU	<S_un.S_un_b.s_b1>
s_imp	EQU	<S_un.S_un_w.s_w2>
s_impno	EQU	<S_un.S_un_b.s_b4>
s_lh	EQU	<S_un.S_un_b.s_b3>
in_addr	ends

IN_CLASSA macro i
	exitm <( ( ( i ) and 80000000h ) == 0 ) >
	endm
IN_CLASSA_NET	EQU	0ff000000h
IN_CLASSA_NSHIFT	EQU	24
IN_CLASSA_HOST	EQU	00ffffffh
IN_CLASSA_MAX	EQU	128

IN_CLASSB macro i
	exitm <( ( ( i ) and 0c0000000h ) == 80000000h ) >
	endm
IN_CLASSB_NET	EQU	0ffff0000h
IN_CLASSB_NSHIFT	EQU	16
IN_CLASSB_HOST	EQU	0000ffffh
IN_CLASSB_MAX	EQU	65536

IN_CLASSC macro i
	exitm <( ( ( i ) and 0e0000000h ) == 0c0000000h ) >
	endm
IN_CLASSC_NET	EQU	0ffffff00h
IN_CLASSC_NSHIFT	EQU	8
IN_CLASSC_HOST	EQU	000000ffh

IN_CLASSD macro i
	exitm <( ( ( i ) and 0f0000000h ) == 0e0000000h ) >
	endm
IN_CLASSD_NET	EQU	0f0000000h
IN_CLASSD_NSHIFT	EQU	28
IN_CLASSD_HOST	EQU	0fffffffh

IN_MULTICAST macro i
	exitm <IN_CLASSD ( i ) >
	endm

INADDR_ANY          EQU 00000000h
INADDR_LOOPBACK     EQU 7f000001h
INADDR_BROADCAST    EQU 0ffffffffh
INADDR_NONE         EQU 0ffffffffh

ADDR_ANY	EQU	<INADDR_ANY>

sockaddr_in	struct 
sin_family	SWORD	?
sin_port	u_short	?
sin_addr in_addr <>
sin_zero	SBYTE 8 dup (?)
sockaddr_in	ends

WSADESCRIPTION_LEN	EQU	256
WSASYS_STATUS_LEN	EQU	128

WSADATA	struct 8	;v2.02: alignment added
wVersion	WORD	?
wHighVersion	WORD	?
ifdef _WIN64
iMaxSockets	WORD	?
iMaxUdpDg	WORD	?
lpVendorInfo	QWORD	?
szDescription	SBYTE WSADESCRIPTION_LEN+1 dup (?)
szSystemStatus	SBYTE WSASYS_STATUS_LEN+1 dup (?)
else
szDescription	SBYTE WSADESCRIPTION_LEN+1 dup (?)
szSystemStatus	SBYTE WSASYS_STATUS_LEN+1 dup (?)
iMaxSockets	WORD	?
iMaxUdpDg	WORD	?
lpVendorInfo	DWORD	?
endif
WSADATA	ends

LPWSADATA typedef ptr WSADATA

INVALID_SOCKET	EQU	<( not 0 )>
SOCKET_ERROR	EQU	-1
FROM_PROTOCOL_INFO	EQU	-1
SOCK_STREAM	EQU	1
SOCK_DGRAM	EQU	2
SOCK_RAW	EQU	3
SOCK_RDM	EQU	4
SOCK_SEQPACKET	EQU	5
SO_DEBUG	EQU	0001h
SO_ACCEPTCONN	EQU	0002h
SO_REUSEADDR	EQU	0004h
SO_KEEPALIVE	EQU	0008h
SO_DONTROUTE	EQU	0010h
SO_BROADCAST	EQU	0020h
SO_USELOOPBACK	EQU	0040h
SO_LINGER	EQU	0080h
SO_OOBINLINE	EQU	0100h
SO_DONTLINGER	EQU	<(  not  SO_LINGER )>
SO_SNDBUF	EQU	1001h
SO_RCVBUF	EQU	1002h
SO_SNDLOWAT	EQU	1003h
SO_RCVLOWAT	EQU	1004h
SO_SNDTIMEO	EQU	1005h
SO_RCVTIMEO	EQU	1006h
SO_ERROR	EQU	1007h
SO_TYPE	EQU	1008h
SO_GROUP_ID	EQU	2001h
SO_GROUP_PRIORITY	EQU	2002h
SO_MAX_MSG_SIZE	EQU	2003h
SO_PROTOCOL_INFOA	EQU	2004h
SO_PROTOCOL_INFOW	EQU	2005h
ifdef UNICODE
SO_PROTOCOL_INFO	EQU	<SO_PROTOCOL_INFOW>
else 
SO_PROTOCOL_INFO	EQU	<SO_PROTOCOL_INFOA>
endif 
PVD_CONFIG	EQU	3001h
TCP_NODELAY	EQU	0001h

AF_UNSPEC	EQU	0
AF_UNIX	EQU	1
AF_INET	EQU	2
AF_IMPLINK	EQU	3
AF_PUP	EQU	4
AF_CHAOS	EQU	5
AF_NS	EQU	6
AF_IPX	EQU	<AF_NS>
AF_ISO	EQU	7
AF_OSI	EQU	<AF_ISO>
AF_ECMA	EQU	8
AF_DATAKIT	EQU	9
AF_CCITT	EQU	10
AF_SNA	EQU	11
AF_DECnet	EQU	12
AF_DLI	EQU	13
AF_LAT	EQU	14
AF_HYLINK	EQU	15
AF_APPLETALK	EQU	16
AF_NETBIOS	EQU	17
AF_VOICEVIEW	EQU	18
AF_FIREFOX	EQU	19
AF_UNKNOWN1	EQU	20
AF_BAN	EQU	21
AF_ATM	EQU	22
AF_INET6	EQU	23
AF_CLUSTER	EQU	24
AF_12844	EQU	25
AF_MAX	EQU	26

sockaddr	struct 
sa_family	u_short	?
sa_data	SBYTE 14 dup (?)
sockaddr	ends

sockproto	struct 
sp_family	u_short	?
sp_protocol	u_short	?
sockproto	ends

PF_UNSPEC	EQU	<AF_UNSPEC>
PF_UNIX	EQU	<AF_UNIX>
PF_INET	EQU	<AF_INET>
PF_IMPLINK	EQU	<AF_IMPLINK>
PF_PUP	EQU	<AF_PUP>
PF_CHAOS	EQU	<AF_CHAOS>
PF_NS	EQU	<AF_NS>
PF_IPX	EQU	<AF_IPX>
PF_ISO	EQU	<AF_ISO>
PF_OSI	EQU	<AF_OSI>
PF_ECMA	EQU	<AF_ECMA>
PF_DATAKIT	EQU	<AF_DATAKIT>
PF_CCITT	EQU	<AF_CCITT>
PF_SNA	EQU	<AF_SNA>
PF_DECnet	EQU	<AF_DECnet>
PF_DLI	EQU	<AF_DLI>
PF_LAT	EQU	<AF_LAT>
PF_HYLINK	EQU	<AF_HYLINK>
PF_APPLETALK	EQU	<AF_APPLETALK>
PF_VOICEVIEW	EQU	<AF_VOICEVIEW>
PF_FIREFOX	EQU	<AF_FIREFOX>
PF_UNKNOWN1	EQU	<AF_UNKNOWN1>
PF_BAN	EQU	<AF_BAN>
PF_ATM	EQU	<AF_ATM>
PF_INET6	EQU	<AF_INET6>
PF_MAX	EQU	<AF_MAX>

linger	struct 
l_onoff	u_short	?
l_linger	u_short	?
linger	ends

SOL_SOCKET	EQU	0ffffh
SOMAXCONN	EQU	7fffffffh
MSG_OOB	EQU	1h
MSG_PEEK	EQU	2h
MSG_DONTROUTE	EQU	4h
MSG_PARTIAL	EQU	8000h
MSG_INTERRUPT	EQU	10h
MSG_MAXIOVLEN	EQU	16
MAXGETHOSTSTRUCT	EQU	1024

FD_READ_BIT	EQU	0
FD_READ	EQU	( 1  shl  FD_READ_BIT )
FD_WRITE_BIT	EQU	1
FD_WRITE	EQU	( 1  shl  FD_WRITE_BIT )
FD_OOB_BIT	EQU	2
FD_OOB	EQU	( 1  shl  FD_OOB_BIT )
FD_ACCEPT_BIT	EQU	3
FD_ACCEPT	EQU	( 1  shl  FD_ACCEPT_BIT )
FD_CONNECT_BIT	EQU	4
FD_CONNECT	EQU	( 1  shl  FD_CONNECT_BIT )
FD_CLOSE_BIT	EQU	5
FD_CLOSE	EQU	( 1  shl  FD_CLOSE_BIT )
FD_QOS_BIT	EQU	6
FD_QOS	EQU	( 1  shl  FD_QOS_BIT )
FD_GROUP_QOS_BIT	EQU	7
FD_GROUP_QOS	EQU	( 1  shl  FD_GROUP_QOS_BIT )
FD_ROUTING_INTERFACE_CHANGE_BIT	EQU	8
FD_ROUTING_INTERFACE_CHANGE	EQU	( 1  shl  FD_ROUTING_INTERFACE_CHANGE_BIT )
FD_ADDRESS_LIST_CHANGE_BIT	EQU	9
FD_ADDRESS_LIST_CHANGE	EQU	( 1  shl  FD_ADDRESS_LIST_CHANGE_BIT )
FD_MAX_EVENTS	EQU	10
FD_ALL_EVENTS	EQU	( ( 1  shl  FD_MAX_EVENTS ) - 1 )

WSABASEERR	EQU	10000
WSAEINTR	EQU	( WSABASEERR + 4 )
WSAEBADF	EQU	( WSABASEERR + 9 )
WSAEACCES	EQU	( WSABASEERR + 13 )
WSAEFAULT	EQU	( WSABASEERR + 14 )
WSAEINVAL	EQU	( WSABASEERR + 22 )
WSAEMFILE	EQU	( WSABASEERR + 24 )
WSAEWOULDBLOCK	EQU	( WSABASEERR + 35 )
WSAEINPROGRESS	EQU	( WSABASEERR + 36 )
WSAEALREADY	EQU	( WSABASEERR + 37 )
WSAENOTSOCK	EQU	( WSABASEERR + 38 )
WSAEDESTADDRREQ	EQU	( WSABASEERR + 39 )
WSAEMSGSIZE	EQU	( WSABASEERR + 40 )
WSAEPROTOTYPE	EQU	( WSABASEERR + 41 )
WSAENOPROTOOPT	EQU	( WSABASEERR + 42 )
WSAEPROTONOSUPPORT	EQU	( WSABASEERR + 43 )
WSAESOCKTNOSUPPORT	EQU	( WSABASEERR + 44 )
WSAEOPNOTSUPP	EQU	( WSABASEERR + 45 )
WSAEPFNOSUPPORT	EQU	( WSABASEERR + 46 )
WSAEAFNOSUPPORT	EQU	( WSABASEERR + 47 )
WSAEADDRINUSE	EQU	( WSABASEERR + 48 )
WSAEADDRNOTAVAIL	EQU	( WSABASEERR + 49 )
WSAENETDOWN	EQU	( WSABASEERR + 50 )
WSAENETUNREACH	EQU	( WSABASEERR + 51 )
WSAENETRESET	EQU	( WSABASEERR + 52 )
WSAECONNABORTED	EQU	( WSABASEERR + 53 )
WSAECONNRESET	EQU	( WSABASEERR + 54 )
WSAENOBUFS	EQU	( WSABASEERR + 55 )
WSAEISCONN	EQU	( WSABASEERR + 56 )
WSAENOTCONN	EQU	( WSABASEERR + 57 )
WSAESHUTDOWN	EQU	( WSABASEERR + 58 )
WSAETOOMANYREFS	EQU	( WSABASEERR + 59 )
WSAETIMEDOUT	EQU	( WSABASEERR + 60 )
WSAECONNREFUSED	EQU	( WSABASEERR + 61 )
WSAELOOP	EQU	( WSABASEERR + 62 )
WSAENAMETOOLONG	EQU	( WSABASEERR + 63 )
WSAEHOSTDOWN	EQU	( WSABASEERR + 64 )
WSAEHOSTUNREACH	EQU	( WSABASEERR + 65 )
WSAENOTEMPTY	EQU	( WSABASEERR + 66 )
WSAEPROCLIM	EQU	( WSABASEERR + 67 )
WSAEUSERS	EQU	( WSABASEERR + 68 )
WSAEDQUOT	EQU	( WSABASEERR + 69 )
WSAESTALE	EQU	( WSABASEERR + 70 )
WSAEREMOTE	EQU	( WSABASEERR + 71 )
WSASYSNOTREADY	EQU	( WSABASEERR + 91 )
WSAVERNOTSUPPORTED	EQU	( WSABASEERR + 92 )
WSANOTINITIALISED	EQU	( WSABASEERR + 93 )
WSAEDISCON	EQU	( WSABASEERR + 101 )
WSAENOMORE	EQU	( WSABASEERR + 102 )
WSAECANCELLED	EQU	( WSABASEERR + 103 )
WSAEINVALIDPROCTABLE	EQU	( WSABASEERR + 104 )
WSAEINVALIDPROVIDER	EQU	( WSABASEERR + 105 )
WSAEPROVIDERFAILEDINIT	EQU	( WSABASEERR + 106 )
WSASYSCALLFAILURE	EQU	( WSABASEERR + 107 )
WSASERVICE_NOT_FOUND	EQU	( WSABASEERR + 108 )
WSATYPE_NOT_FOUND	EQU	( WSABASEERR + 109 )
WSA_E_NO_MORE	EQU	( WSABASEERR + 110 )
WSA_E_CANCELLED	EQU	( WSABASEERR + 111 )
WSAEREFUSED	EQU	( WSABASEERR + 112 )
h_errno	EQU	<WSAGetLastError ( )>
WSAHOST_NOT_FOUND	EQU	( WSABASEERR + 1001 )
HOST_NOT_FOUND	EQU	<WSAHOST_NOT_FOUND>
WSATRY_AGAIN	EQU	( WSABASEERR + 1002 )
TRY_AGAIN	EQU	<WSATRY_AGAIN>
WSANO_RECOVERY	EQU	( WSABASEERR + 1003 )
NO_RECOVERY	EQU	<WSANO_RECOVERY>
WSANO_DATA	EQU	( WSABASEERR + 1004 )
NO_DATA	EQU	<WSANO_DATA>
WSANO_ADDRESS	EQU	<WSANO_DATA>
NO_ADDRESS	EQU	<WSANO_ADDRESS>
WSA_QOS_RECEIVERS	EQU	( WSABASEERR + 1005 )
WSA_QOS_SENDERS	EQU	( WSABASEERR + 1006 )
WSA_QOS_NO_SENDERS	EQU	( WSABASEERR + 1007 )
WSA_QOS_NO_RECEIVERS	EQU	( WSABASEERR + 1008 )
WSA_QOS_REQUEST_CONFIRMED	EQU	( WSABASEERR + 1009 )
WSA_QOS_ADMISSION_FAILURE	EQU	( WSABASEERR + 1010 )
WSA_QOS_POLICY_FAILURE	EQU	( WSABASEERR + 1011 )
WSA_QOS_BAD_STYLE	EQU	( WSABASEERR + 1012 )
WSA_QOS_BAD_OBJECT	EQU	( WSABASEERR + 1013 )
WSA_QOS_TRAFFIC_CTRL_ERROR	EQU	( WSABASEERR + 1014 )
WSA_QOS_GENERIC_ERROR	EQU	( WSABASEERR + 1015 )

if 0
EWOULDBLOCK	EQU	<WSAEWOULDBLOCK>
EINPROGRESS	EQU	<WSAEINPROGRESS>
EALREADY	EQU	<WSAEALREADY>
ENOTSOCK	EQU	<WSAENOTSOCK>
EDESTADDRREQ	EQU	<WSAEDESTADDRREQ>
EMSGSIZE	EQU	<WSAEMSGSIZE>
EPROTOTYPE	EQU	<WSAEPROTOTYPE>
ENOPROTOOPT	EQU	<WSAENOPROTOOPT>
EPROTONOSUPPORT	EQU	<WSAEPROTONOSUPPORT>
ESOCKTNOSUPPORT	EQU	<WSAESOCKTNOSUPPORT>
EOPNOTSUPP	EQU	<WSAEOPNOTSUPP>
EPFNOSUPPORT	EQU	<WSAEPFNOSUPPORT>
EAFNOSUPPORT	EQU	<WSAEAFNOSUPPORT>
EADDRINUSE	EQU	<WSAEADDRINUSE>
EADDRNOTAVAIL	EQU	<WSAEADDRNOTAVAIL>
ENETDOWN	EQU	<WSAENETDOWN>
ENETUNREACH	EQU	<WSAENETUNREACH>
ENETRESET	EQU	<WSAENETRESET>
ECONNABORTED	EQU	<WSAECONNABORTED>
ECONNRESET	EQU	<WSAECONNRESET>
ENOBUFS	EQU	<WSAENOBUFS>
EISCONN	EQU	<WSAEISCONN>
ENOTCONN	EQU	<WSAENOTCONN>
ESHUTDOWN	EQU	<WSAESHUTDOWN>
ETOOMANYREFS	EQU	<WSAETOOMANYREFS>
ETIMEDOUT	EQU	<WSAETIMEDOUT>
ECONNREFUSED	EQU	<WSAECONNREFUSED>
ELOOP	EQU	<WSAELOOP>
ENAMETOOLONG	EQU	<WSAENAMETOOLONG>
EHOSTDOWN	EQU	<WSAEHOSTDOWN>
EHOSTUNREACH	EQU	<WSAEHOSTUNREACH>
ENOTEMPTY	EQU	<WSAENOTEMPTY>
EPROCLIM	EQU	<WSAEPROCLIM>
EUSERS	EQU	<WSAEUSERS>
EDQUOT	EQU	<WSAEDQUOT>
ESTALE	EQU	<WSAESTALE>
EREMOTE	EQU	<WSAEREMOTE>
endif 

ifdef WIN32

WSAAPI	EQU	<FAR PASCAL>
WSAEVENT	EQU	<HANDLE>
LPWSAEVENT	EQU	<LPHANDLE>
WSAOVERLAPPED	EQU	<OVERLAPPED>
LPWSAOVERLAPPED typedef ptr _OVERLAPPED

WSA_IO_PENDING	EQU	<( ERROR_IO_PENDING )>
WSA_IO_INCOMPLETE	EQU	<( ERROR_IO_INCOMPLETE )>
WSA_INVALID_HANDLE	EQU	<( ERROR_INVALID_HANDLE )>
WSA_INVALID_PARAMETER	EQU	<( ERROR_INVALID_PARAMETER )>
WSA_NOT_ENOUGH_MEMORY	EQU	<( ERROR_NOT_ENOUGH_MEMORY )>
WSA_OPERATION_ABORTED	EQU	<( ERROR_OPERATION_ABORTED )>
WSA_INVALID_EVENT	EQU	<( NULL )>
WSA_MAXIMUM_WAIT_EVENTS	EQU	<( MAXIMUM_WAIT_OBJECTS )>
WSA_WAIT_FAILED	EQU	- 1
WSA_WAIT_EVENT_0	EQU	<( WAIT_OBJECT_0 )>
WSA_WAIT_IO_COMPLETION	EQU	<( WAIT_IO_COMPLETION )>
WSA_WAIT_TIMEOUT	EQU	<( WAIT_TIMEOUT )>
WSA_INFINITE	EQU	<( INFINITE )>

else ; WIN16

WSAAPI	EQU	<FAR PASCAL>
WSAEVENT typedef DWORD
LPWSAEVENT typedef ptr DWORD

WSAOVERLAPPED	struct 
Internal	DWORD	?
InternalHigh	DWORD	?
Offset_	DWORD	?
OffsetHigh	DWORD	?
hEvent	WSAEVENT	?
WSAOVERLAPPED	ends

LPWSAOVERLAPPED typedef ptr WSAOVERLAPPED

WSA_IO_PENDING	EQU	<( WSAEWOULDBLOCK )>
WSA_IO_INCOMPLETE	EQU	<( WSAEWOULDBLOCK )>
WSA_INVALID_HANDLE	EQU	<( WSAENOTSOCK )>
WSA_INVALID_PARAMETER	EQU	<( WSAEINVAL )>
WSA_NOT_ENOUGH_MEMORY	EQU	<( WSAENOBUFS )>
WSA_OPERATION_ABORTED	EQU	<( WSAEINTR )>
WSA_INVALID_EVENT	EQU	<( NULL )>
WSA_MAXIMUM_WAIT_EVENTS	EQU	<( MAXIMUM_WAIT_OBJECTS )>
WSA_WAIT_FAILED	EQU	-1
WSA_WAIT_EVENT_0	EQU	0
WSA_WAIT_TIMEOUT	EQU	102h
WSA_INFINITE	EQU	-1

endif 

WSABUF	struct 
len	u_long	?
buf	LPVOID	?
WSABUF	ends

LPWSABUF typedef ptr WSABUF

	include qos.inc

QOS	struct 
SendingFlowspec	FLOWSPEC	<>
ReceivingFlowspec	FLOWSPEC	<>
ProviderSpecific	WSABUF	<>
QOS	ends

LPQOS typedef ptr QOS

CF_ACCEPT	EQU	0000h
CF_REJECT	EQU	0001h
CF_DEFER	EQU	0002h
SD_RECEIVE	EQU	00h
SD_SEND	EQU	01h
SD_BOTH	EQU	02h
GROUP_ typedef DWORD
SG_UNCONSTRAINED_GROUP	EQU	01h
SG_CONSTRAINED_GROUP	EQU	02h

WSANETWORKEVENTS	struct 
lNetworkEvents	SDWORD	?
iErrorCode	DWORD FD_MAX_EVENTS dup (?)
WSANETWORKEVENTS	ends

LPWSANETWORKEVENTS typedef ptr WSANETWORKEVENTS

ifndef GUID_DEFINED
GUID_DEFINED	EQU	<>
GUID	struct 
Data1	DWORD	?
Data2	WORD	?
Data3	WORD	?
Data4	BYTE 8 dup (?)
GUID	ends

endif 

ifndef __LPGUID_DEFINED__
__LPGUID_DEFINED__	EQU	<>
LPGUID typedef ptr GUID
endif 
MAX_PROTOCOL_CHAIN	EQU	7
BASE_PROTOCOL	EQU	1
LAYERED_PROTOCOL	EQU	0

WSAPROTOCOLCHAIN	struct 
ChainLen	DWORD	?
ChainEntries	DWORD MAX_PROTOCOL_CHAIN dup (?)
WSAPROTOCOLCHAIN	ends

LPWSAPROTOCOLCHAIN typedef ptr WSAPROTOCOLCHAIN

WSAPROTOCOL_LEN	EQU	255
WSAPROTOCOL_INFOA	struct 
dwServiceFlags1	DWORD	?
dwServiceFlags2	DWORD	?
dwServiceFlags3	DWORD	?
dwServiceFlags4	DWORD	?
dwProviderFlags	DWORD	?
ProviderId	GUID	<>
dwCatalogEntryId	DWORD	?
ProtocolChain	WSAPROTOCOLCHAIN	<>
iVersion	DWORD	?
iAddressFamily	DWORD	?
iMaxSockAddr	DWORD	?
iMinSockAddr	DWORD	?
iSocketType	DWORD	?
iProtocol	DWORD	?
iProtocolMaxOffset	DWORD	?
iNetworkByteOrder	DWORD	?
iSecurityScheme	DWORD	?
dwMessageSize	DWORD	?
dwProviderReserved	DWORD	?
szProtocol	CHAR WSAPROTOCOL_LEN+1 dup (?)
WSAPROTOCOL_INFOA	ends

LPWSAPROTOCOL_INFOA typedef ptr WSAPROTOCOL_INFOA

WSAPROTOCOL_INFOW	struct 
dwServiceFlags1	DWORD	?
dwServiceFlags2	DWORD	?
dwServiceFlags3	DWORD	?
dwServiceFlags4	DWORD	?
dwProviderFlags	DWORD	?
ProviderId	GUID	<>
dwCatalogEntryId	DWORD	?
ProtocolChain	WSAPROTOCOLCHAIN	<>
iVersion	DWORD	?
iAddressFamily	DWORD	?
iMaxSockAddr	DWORD	?
iMinSockAddr	DWORD	?
iSocketType	DWORD	?
iProtocol	DWORD	?
iProtocolMaxOffset	DWORD	?
iNetworkByteOrder	DWORD	?
iSecurityScheme	DWORD	?
dwMessageSize	DWORD	?
dwProviderReserved	DWORD	?
szProtocol	WCHAR WSAPROTOCOL_LEN+1 dup (?)
WSAPROTOCOL_INFOW	ends

LPWSAPROTOCOL_INFOW typedef ptr WSAPROTOCOL_INFOW

ifdef UNICODE
WSAPROTOCOL_INFO typedef WSAPROTOCOL_INFOW
LPWSAPROTOCOL_INFO typedef LPWSAPROTOCOL_INFOW
else 
WSAPROTOCOL_INFO typedef WSAPROTOCOL_INFOA
LPWSAPROTOCOL_INFO typedef LPWSAPROTOCOL_INFOA
endif 

PFL_MULTIPLE_PROTO_ENTRIES	EQU	00000001h
PFL_RECOMMENDED_PROTO_ENTRY	EQU	00000002h
PFL_HIDDEN	EQU	00000004h
PFL_MATCHES_PROTOCOL_ZERO	EQU	00000008h
XP1_CONNECTIONLESS	EQU	00000001h
XP1_GUARANTEED_DELIVERY	EQU	00000002h
XP1_GUARANTEED_ORDER	EQU	00000004h
XP1_MESSAGE_ORIENTED	EQU	00000008h
XP1_PSEUDO_STREAM	EQU	00000010h
XP1_GRACEFUL_CLOSE	EQU	00000020h
XP1_EXPEDITED_DATA	EQU	00000040h
XP1_CONNECT_DATA	EQU	00000080h
XP1_DISCONNECT_DATA	EQU	00000100h
XP1_SUPPORT_BROADCAST	EQU	00000200h
XP1_SUPPORT_MULTIPOINT	EQU	00000400h
XP1_MULTIPOINT_CONTROL_PLANE	EQU	00000800h
XP1_MULTIPOINT_DATA_PLANE	EQU	00001000h
XP1_QOS_SUPPORTED	EQU	00002000h
XP1_INTERRUPT	EQU	00004000h
XP1_UNI_SEND	EQU	00008000h
XP1_UNI_RECV	EQU	00010000h
XP1_IFS_HANDLES	EQU	00020000h
XP1_PARTIAL_MESSAGE	EQU	00040000h
BIGENDIAN	EQU	0000h
LITTLEENDIAN	EQU	0001h
SECURITY_PROTOCOL_NONE	EQU	0000h
JL_SENDER_ONLY	EQU	01h
JL_RECEIVER_ONLY	EQU	02h
JL_BOTH	EQU	04h
WSA_FLAG_OVERLAPPED	EQU	01h
WSA_FLAG_MULTIPOINT_C_ROOT	EQU	02h
WSA_FLAG_MULTIPOINT_C_LEAF	EQU	04h
WSA_FLAG_MULTIPOINT_D_ROOT	EQU	08h
WSA_FLAG_MULTIPOINT_D_LEAF	EQU	10h
IOC_UNIX	EQU	00000000h
IOC_WS2	EQU	08000000h
IOC_PROTOCOL	EQU	10000000h
IOC_VENDOR	EQU	18000000h
_WSAIO macro x,y
	exitm <( IOC_VOID  or  ( x )  or  ( y ) ) >
	endm
_WSAIOR macro x,y
	exitm <( IOC_OUT  or  ( x )  or  ( y ) ) >
	endm
_WSAIOW macro x,y
	exitm <( IOC_IN  or  ( x )  or  ( y ) ) >
	endm
_WSAIORW macro x,y
	exitm <( IOC_INOUT  or  ( x )  or  ( y ) ) >
	endm
SIO_ASSOCIATE_HANDLE	EQU	<_WSAIOW ( IOC_WS2 , 1 )>
SIO_ENABLE_CIRCULAR_QUEUEING	EQU	<_WSAIO ( IOC_WS2 , 2 )>
SIO_FIND_ROUTE	EQU	<_WSAIOR ( IOC_WS2 , 3 )>
SIO_FLUSH	EQU	<_WSAIO ( IOC_WS2 , 4 )>
SIO_GET_BROADCAST_ADDRESS	EQU	<_WSAIOR ( IOC_WS2 , 5 )>
SIO_GET_EXTENSION_FUNCTION_POINTER	EQU	<_WSAIORW ( IOC_WS2 , 6 )>
SIO_GET_QOS	EQU	<_WSAIORW ( IOC_WS2 , 7 )>
SIO_GET_GROUP_QOS	EQU	<_WSAIORW ( IOC_WS2 , 8 )>
SIO_MULTIPOINT_LOOPBACK	EQU	<_WSAIOW ( IOC_WS2 , 9 )>
SIO_MULTICAST_SCOPE	EQU	<_WSAIOW ( IOC_WS2 , 10 )>
SIO_SET_QOS	EQU	<_WSAIOW ( IOC_WS2 , 11 )>
SIO_SET_GROUP_QOS	EQU	<_WSAIOW ( IOC_WS2 , 12 )>
SIO_TRANSLATE_HANDLE	EQU	<_WSAIORW ( IOC_WS2 , 13 )>
SIO_ROUTING_INTERFACE_QUERY	EQU	<_WSAIORW ( IOC_WS2 , 20 )>
SIO_ROUTING_INTERFACE_CHANGE	EQU	<_WSAIOW ( IOC_WS2 , 21 )>
SIO_ADDRESS_LIST_QUERY	EQU	<_WSAIOR ( IOC_WS2 , 22 )>
SIO_ADDRESS_LIST_CHANGE	EQU	<_WSAIO ( IOC_WS2 , 23 )>
SIO_QUERY_TARGET_PNP_HANDLE	EQU	<_WSAIOR ( IOC_W32 , 24 )>
TH_NETDEV	EQU	00000001h
TH_TAPI	EQU	00000002h
SOCKADDR typedef sockaddr

PSOCKADDR typedef ptr sockaddr

LPSOCKADDR typedef ptr sockaddr

ifndef _tagBLOB_DEFINED
_tagBLOB_DEFINED	EQU	<>
_BLOB_DEFINED	EQU	<>
_LPBLOB_DEFINED	EQU	<>
BLOB	struct 
cbSize	DWORD	?
ifdef MIDL_PASS
pBlobData	DWORD size_is(cbSize) dup (?)
else 
pBlobData	DWORD	?
endif 
BLOB	ends

LPBLOB typedef ptr BLOB

endif 

SERVICE_MULTIPLE	EQU	00000001h
NS_ALL	EQU	0
NS_SAP	EQU	1
NS_NDS	EQU	2
NS_PEER_BROWSE	EQU	3
NS_TCPIP_LOCAL	EQU	10
NS_TCPIP_HOSTS	EQU	11
NS_DNS	EQU	12
NS_NETBT	EQU	13
NS_WINS	EQU	14
NS_NBP	EQU	20
NS_MS	EQU	30
NS_STDA	EQU	31
NS_NTDS	EQU	32
NS_X500	EQU	40
NS_NIS	EQU	41
NS_NISPLUS	EQU	42
NS_WRQ	EQU	50
RES_UNUSED_1	EQU	00000001h
RES_FLUSH_CACHE	EQU	00000002h
ifndef RES_SERVICE
RES_SERVICE	EQU	00000004h
endif 
SERVICE_TYPE_VALUE_IPXPORTA	EQU	<"IpxSocket">
SERVICE_TYPE_VALUE_IPXPORTW	EQU	<L("IpxSocket")>
SERVICE_TYPE_VALUE_SAPIDA	EQU	<"SapId">
SERVICE_TYPE_VALUE_SAPIDW	EQU	<L("SapId")>
SERVICE_TYPE_VALUE_TCPPORTA	EQU	<"TcpPort">
SERVICE_TYPE_VALUE_TCPPORTW	EQU	<L("TcpPort")>
SERVICE_TYPE_VALUE_UDPPORTA	EQU	<"UdpPort">
SERVICE_TYPE_VALUE_UDPPORTW	EQU	<L("UdpPort")>
SERVICE_TYPE_VALUE_OBJECTIDA	EQU	<"ObjectId">
SERVICE_TYPE_VALUE_OBJECTIDW	EQU	<L("ObjectId")>

ifdef UNICODE
SERVICE_TYPE_VALUE_SAPID	EQU	<SERVICE_TYPE_VALUE_SAPIDW>
SERVICE_TYPE_VALUE_TCPPORT	EQU	<SERVICE_TYPE_VALUE_TCPPORTW>
SERVICE_TYPE_VALUE_UDPPORT	EQU	<SERVICE_TYPE_VALUE_UDPPORTW>
SERVICE_TYPE_VALUE_OBJECTID	EQU	<SERVICE_TYPE_VALUE_OBJECTIDW>
else 
SERVICE_TYPE_VALUE_SAPID	EQU	<SERVICE_TYPE_VALUE_SAPIDA>
SERVICE_TYPE_VALUE_TCPPORT	EQU	<SERVICE_TYPE_VALUE_TCPPORTA>
SERVICE_TYPE_VALUE_UDPPORT	EQU	<SERVICE_TYPE_VALUE_UDPPORTA>
SERVICE_TYPE_VALUE_OBJECTID	EQU	<SERVICE_TYPE_VALUE_OBJECTIDA>
endif 

ifndef __CSADDR_DEFINED__
__CSADDR_DEFINED__	EQU	<>
SOCKET_ADDRESS	struct 
lpSockaddr	LPSOCKADDR	?
iSockaddrLength	DWORD	?
SOCKET_ADDRESS	ends

PSOCKET_ADDRESS typedef ptr SOCKET_ADDRESS
LPSOCKET_ADDRESS typedef ptr SOCKET_ADDRESS

CSADDR_INFO	struct 
LocalAddr	SOCKET_ADDRESS	<>
RemoteAddr	SOCKET_ADDRESS	<>
iSocketType	DWORD	?
iProtocol	DWORD	?
CSADDR_INFO	ends

PCSADDR_INFO typedef ptr CSADDR_INFO
LPCSADDR_INFO typedef ptr CSADDR_INFO

endif 

SOCKET_ADDRESS_LIST	struct 
iAddressCount	DWORD	?
Address	SOCKET_ADDRESS 1 dup (<>)
SOCKET_ADDRESS_LIST	ends

LPSOCKET_ADDRESS_LIST typedef ptr SOCKET_ADDRESS_LIST

AFPROTOCOLS	struct 
iAddressFamily	DWORD	?
iProtocol	DWORD	?
AFPROTOCOLS	ends

PAFPROTOCOLS typedef ptr AFPROTOCOLS
LPAFPROTOCOLS typedef ptr AFPROTOCOLS

WSAECOMPARATOR typedef DWORD
COMP_EQUAL = 0 
COMP_NOTLESS = 1

PWSAECOMPARATOR typedef ptr WSAECOMPARATOR
LPWSAECOMPARATOR typedef ptr WSAECOMPARATOR

WSAVERSION	struct 
dwVersion	DWORD	?
ecHow	WSAECOMPARATOR	?
WSAVERSION	ends

PWSAVERSION typedef ptr WSAVERSION
LPWSAVERSION typedef ptr WSAVERSION

WSAQUERYSETA	struct 
dwSize	DWORD	?
lpszServiceInstanceName	LPSTR	?
lpServiceClassId	LPGUID	?
lpVersion	LPWSAVERSION	?
lpszComment	LPSTR	?
dwNameSpace	DWORD	?
lpNSProviderId	LPGUID	?
lpszContext	LPSTR	?
dwNumberOfProtocols	DWORD	?
lpafpProtocols	LPAFPROTOCOLS	?
lpszQueryString	LPSTR	?
dwNumberOfCsAddrs	DWORD	?
lpcsaBuffer	LPCSADDR_INFO	?
dwOutputFlags	DWORD	?
lpBlob	LPBLOB	?
WSAQUERYSETA	ends

PWSAQUERYSETA typedef ptr WSAQUERYSETA
LPWSAQUERYSETA typedef ptr WSAQUERYSETA

WSAQUERYSETW	struct 
dwSize	DWORD	?
lpszServiceInstanceName	LPWSTR	?
lpServiceClassId	LPGUID	?
lpVersion	LPWSAVERSION	?
lpszComment	LPWSTR	?
dwNameSpace	DWORD	?
lpNSProviderId	LPGUID	?
lpszContext	LPWSTR	?
dwNumberOfProtocols	DWORD	?
lpafpProtocols	LPAFPROTOCOLS	?
lpszQueryString	LPWSTR	?
dwNumberOfCsAddrs	DWORD	?
lpcsaBuffer	LPCSADDR_INFO	?
dwOutputFlags	DWORD	?
lpBlob	LPBLOB	?
WSAQUERYSETW	ends

PWSAQUERYSETW typedef ptr WSAQUERYSETW
LPWSAQUERYSETW typedef ptr WSAQUERYSETW

ifdef UNICODE
WSAQUERYSET typedef WSAQUERYSETW
PWSAQUERYSET typedef PWSAQUERYSETW
LPWSAQUERYSET typedef LPWSAQUERYSETW
else 
WSAQUERYSET typedef WSAQUERYSETA
PWSAQUERYSET typedef PWSAQUERYSETA
LPWSAQUERYSET typedef LPWSAQUERYSETA
endif 

LUP_DEEP	EQU	0001h
LUP_CONTAINERS	EQU	0002h
LUP_NOCONTAINERS	EQU	0004h
LUP_NEAREST	EQU	0008h
LUP_RETURN_NAME	EQU	0010h
LUP_RETURN_TYPE	EQU	0020h
LUP_RETURN_VERSION	EQU	0040h
LUP_RETURN_COMMENT	EQU	0080h
LUP_RETURN_ADDR	EQU	0100h
LUP_RETURN_BLOB	EQU	0200h
LUP_RETURN_ALIASES	EQU	0400h
LUP_RETURN_QUERY_STRING	EQU	0800h
LUP_RETURN_ALL	EQU	0FF0h
LUP_RES_SERVICE	EQU	8000h
LUP_FLUSHCACHE	EQU	1000h
LUP_FLUSHPREVIOUS	EQU	2000h
RESULT_IS_ALIAS	EQU	0001h
WSAESETSERVICEOP typedef DWORD
RNRSERVICE_REGISTER = 0 
RNRSERVICE_DEREGISTER = 1
RNRSERVICE_DELETE = 2

PWSAESETSERVICEOP typedef ptr WSAESETSERVICEOP
LPWSAESETSERVICEOP typedef ptr WSAESETSERVICEOP

WSANSCLASSINFOA	struct 
lpszName	LPSTR	?
dwNameSpace	DWORD	?
dwValueType	DWORD	?
dwValueSize	DWORD	?
lpValue	LPVOID	?
WSANSCLASSINFOA	ends

PWSANSCLASSINFOA typedef ptr WSANSCLASSINFOA
LPWSANSCLASSINFOA typedef ptr WSANSCLASSINFOA

WSANSCLASSINFOW	struct 
lpszName	LPWSTR	?
dwNameSpace	DWORD	?
dwValueType	DWORD	?
dwValueSize	DWORD	?
lpValue	LPVOID	?
WSANSCLASSINFOW	ends

PWSANSCLASSINFOW typedef ptr WSANSCLASSINFOW
LPWSANSCLASSINFOW typedef ptr WSANSCLASSINFOW

ifdef UNICODE
WSANSCLASSINFO typedef WSANSCLASSINFOW
PWSANSCLASSINFO typedef PWSANSCLASSINFOW
LPWSANSCLASSINFO typedef LPWSANSCLASSINFOW
else 
WSANSCLASSINFO typedef WSANSCLASSINFOA
PWSANSCLASSINFO typedef PWSANSCLASSINFOA
LPWSANSCLASSINFO typedef LPWSANSCLASSINFOA
endif 

WSASERVICECLASSINFOA	struct 
lpServiceClassId	LPGUID	?
lpszServiceClassName	LPSTR	?
dwCount	DWORD	?
lpClassInfos	LPWSANSCLASSINFOA	?
WSASERVICECLASSINFOA	ends

PWSASERVICECLASSINFOA typedef ptr WSASERVICECLASSINFOA
LPWSASERVICECLASSINFOA typedef ptr WSASERVICECLASSINFOA

WSASERVICECLASSINFOW	struct 
lpServiceClassId	LPGUID	?
lpszServiceClassName	LPWSTR	?
dwCount	DWORD	?
lpClassInfos	LPWSANSCLASSINFOW	?
WSASERVICECLASSINFOW	ends

PWSASERVICECLASSINFOW typedef ptr WSASERVICECLASSINFOW
LPWSASERVICECLASSINFOW typedef ptr WSASERVICECLASSINFOW

ifdef UNICODE
WSASERVICECLASSINFO typedef WSASERVICECLASSINFOW
PWSASERVICECLASSINFO typedef PWSASERVICECLASSINFOW
LPWSASERVICECLASSINFO typedef LPWSASERVICECLASSINFOW
else 
WSASERVICECLASSINFO typedef WSASERVICECLASSINFOA
PWSASERVICECLASSINFO typedef PWSASERVICECLASSINFOA
LPWSASERVICECLASSINFO typedef LPWSASERVICECLASSINFOA
endif 

WSANAMESPACE_INFOA	struct 
NSProviderId	GUID	<>
dwNameSpace	DWORD	?
fActive	BOOL	?
dwVersion	DWORD	?
lpszIdentifier	LPSTR	?
WSANAMESPACE_INFOA	ends

PWSANAMESPACE_INFOA typedef ptr WSANAMESPACE_INFOA
LPWSANAMESPACE_INFOA typedef ptr WSANAMESPACE_INFOA

WSANAMESPACE_INFOW	struct 
NSProviderId	GUID	<>
dwNameSpace	DWORD	?
fActive	BOOL	?
dwVersion	DWORD	?
lpszIdentifier	LPWSTR	?
WSANAMESPACE_INFOW	ends

PWSANAMESPACE_INFOW  typedef ptr WSANAMESPACE_INFOW
LPWSANAMESPACE_INFOW typedef ptr WSANAMESPACE_INFOW

ifdef UNICODE
WSANAMESPACE_INFO   typedef WSANAMESPACE_INFOW
PWSANAMESPACE_INFO  typedef PWSANAMESPACE_INFOW
LPWSANAMESPACE_INFO typedef LPWSANAMESPACE_INFOW
else 
WSANAMESPACE_INFO   typedef WSANAMESPACE_INFOA
PWSANAMESPACE_INFO  typedef PWSANAMESPACE_INFOA
LPWSANAMESPACE_INFO typedef LPWSANAMESPACE_INFOA
endif 

proto_LPCONDITIONPROC typedef proto WINSTDCALLCONV :LPWSABUF,:LPWSABUF,:LPQOS,:LPQOS,:LPWSABUF,:LPWSABUF,:ptr GROUP_,:DWORD_PTR
LPCONDITIONPROC typedef ptr proto_LPCONDITIONPROC
proto_LPWSAOVERLAPPED_COMPLETION_ROUTINE typedef proto WINSTDCALLCONV :DWORD,:DWORD,:LPWSAOVERLAPPED,:DWORD
LPWSAOVERLAPPED_COMPLETION_ROUTINE typedef ptr proto_LPWSAOVERLAPPED_COMPLETION_ROUTINE

if INCL_WINSOCK_API_PROTOTYPES
@DefProto WINSOCK_API_LINKAGE, accept,      WINSTDCALLCONV, ,<:SOCKET, :ptr sockaddr, :ptr DWORD>, 12
@DefProto WINSOCK_API_LINKAGE, bind,        WINSTDCALLCONV, ,<:SOCKET, :ptr sockaddr, :DWORD>, 12
@DefProto WINSOCK_API_LINKAGE, closesocket, WINSTDCALLCONV, ,<:SOCKET>, 4
@DefProto WINSOCK_API_LINKAGE, connect,     WINSTDCALLCONV, ,<:SOCKET, :ptr sockaddr, :DWORD>, 12
@DefProto WINSOCK_API_LINKAGE, ioctlsocket, WINSTDCALLCONV, ,<:SOCKET, :SDWORD, :ptr u_long>, 12
@DefProto WINSOCK_API_LINKAGE, getpeername, WINSTDCALLCONV, ,<:SOCKET, :ptr sockaddr, :ptr DWORD>, 12
@DefProto WINSOCK_API_LINKAGE, getsockname, WINSTDCALLCONV, ,<:SOCKET, :ptr sockaddr, :ptr DWORD>, 12
@DefProto WINSOCK_API_LINKAGE, getsockopt,  WINSTDCALLCONV, ,<:SOCKET, :DWORD, :DWORD, :ptr SBYTE, :ptr DWORD>, 20
@DefProto WINSOCK_API_LINKAGE, htonl,       WINSTDCALLCONV, ,<:u_long>, 4
@DefProto WINSOCK_API_LINKAGE, htons,       WINSTDCALLCONV, ,<:DWORD>, 4
@DefProto WINSOCK_API_LINKAGE, inet_addr,   WINSTDCALLCONV, ,<:ptr SBYTE>, 4
@DefProto WINSOCK_API_LINKAGE, inet_ntoa,   WINSTDCALLCONV, ,<:in_addr>, 4
@DefProto WINSOCK_API_LINKAGE, listen,      WINSTDCALLCONV, ,<:SOCKET, :DWORD>, 8
@DefProto WINSOCK_API_LINKAGE, ntohl,       WINSTDCALLCONV, ,<:u_long>, 4
@DefProto WINSOCK_API_LINKAGE, ntohs,       WINSTDCALLCONV, ,<:u_short>, 4
@DefProto WINSOCK_API_LINKAGE, recv,        WINSTDCALLCONV, ,<:SOCKET, :ptr SBYTE, :DWORD, :DWORD>, 16
@DefProto WINSOCK_API_LINKAGE, recvfrom,    WINSTDCALLCONV, ,<:SOCKET, :ptr SBYTE, :DWORD, :DWORD, :ptr sockaddr, :ptr DWORD>, 24
@DefProto WINSOCK_API_LINKAGE, select,      WINSTDCALLCONV, ,<:DWORD, :ptr fd_set, :ptr fd_set, :ptr fd_set, :ptr timeval>, 20
@DefProto WINSOCK_API_LINKAGE, send,        WINSTDCALLCONV, ,<:SOCKET, :ptr SBYTE, :DWORD, :DWORD>, 16
@DefProto WINSOCK_API_LINKAGE, sendto,      WINSTDCALLCONV, ,<:SOCKET, :ptr SBYTE, :DWORD, :DWORD, :ptr sockaddr, :DWORD>, 24
@DefProto WINSOCK_API_LINKAGE, setsockopt,  WINSTDCALLCONV, ,<:SOCKET, :DWORD, :DWORD, :ptr SBYTE, :DWORD>, 20
@DefProto WINSOCK_API_LINKAGE, shutdown,    WINSTDCALLCONV, ,<:SOCKET, :DWORD>, 8
@DefProto WINSOCK_API_LINKAGE, socket,      WINSTDCALLCONV, ,<:DWORD, :DWORD, :DWORD>, 12
@DefProto WINSOCK_API_LINKAGE, gethostbyaddr,    WINSTDCALLCONV, ,<:ptr SBYTE, :DWORD, :DWORD>, 12
@DefProto WINSOCK_API_LINKAGE, gethostbyname,    WINSTDCALLCONV, ,<:ptr SBYTE>, 4
@DefProto WINSOCK_API_LINKAGE, gethostname,      WINSTDCALLCONV, ,<:ptr SBYTE, :DWORD>, 8
@DefProto WINSOCK_API_LINKAGE, getservbyport,    WINSTDCALLCONV, ,<:DWORD, :ptr SBYTE>, 8
@DefProto WINSOCK_API_LINKAGE, getservbyname,    WINSTDCALLCONV, ,<:ptr SBYTE, :ptr SBYTE>, 8
@DefProto WINSOCK_API_LINKAGE, getprotobynumber, WINSTDCALLCONV, ,<:DWORD>, 4
@DefProto WINSOCK_API_LINKAGE, getprotobyname,   WINSTDCALLCONV, ,<:ptr SBYTE>, 4
@DefProto WINSOCK_API_LINKAGE, WSAStartup,       WINSTDCALLCONV, ,<:WORD, :LPWSADATA>, 8
@DefProto WINSOCK_API_LINKAGE, WSACleanup,       WINSTDCALLCONV, ,<>, 0
@DefProto WINSOCK_API_LINKAGE, WSASetLastError,  WINSTDCALLCONV, ,<:DWORD>, 4
@DefProto WINSOCK_API_LINKAGE, WSAGetLastError,  WINSTDCALLCONV, ,<>, 0
@DefProto WINSOCK_API_LINKAGE, WSAIsBlocking,    WINSTDCALLCONV, ,<>, 0
@DefProto WINSOCK_API_LINKAGE, WSAUnhookBlockingHook,    WINSTDCALLCONV, ,<>, 0
@DefProto WINSOCK_API_LINKAGE, WSASetBlockingHook,       WINSTDCALLCONV, ,<:FARPROC>, 4
@DefProto WINSOCK_API_LINKAGE, WSACancelBlockingCall,    WINSTDCALLCONV, ,<>, 0
@DefProto WINSOCK_API_LINKAGE, WSAAsyncGetServByName,    WINSTDCALLCONV, ,<:HWND, :u_int, :ptr SBYTE, :ptr SBYTE, :ptr SBYTE, :DWORD>, 24
@DefProto WINSOCK_API_LINKAGE, WSAAsyncGetServByPort,    WINSTDCALLCONV, ,<:HWND, :u_int, :DWORD, :ptr SBYTE, :ptr SBYTE, :DWORD>, 24
@DefProto WINSOCK_API_LINKAGE, WSAAsyncGetProtoByName,   WINSTDCALLCONV, ,<:HWND, :u_int, :ptr SBYTE, :ptr SBYTE, :DWORD>, 20
@DefProto WINSOCK_API_LINKAGE, WSAAsyncGetProtoByNumber, WINSTDCALLCONV, ,<:HWND, :u_int, :DWORD, :ptr SBYTE, :DWORD>, 20
@DefProto WINSOCK_API_LINKAGE, WSAAsyncGetHostByName,    WINSTDCALLCONV, ,<:HWND, :u_int, :ptr SBYTE, :ptr SBYTE, :DWORD>, 20
@DefProto WINSOCK_API_LINKAGE, WSAAsyncGetHostByAddr,    WINSTDCALLCONV, ,<:HWND, :u_int, :ptr SBYTE, :DWORD, :DWORD, :ptr SBYTE, :DWORD>, 28
@DefProto WINSOCK_API_LINKAGE, WSACancelAsyncRequest,    WINSTDCALLCONV, ,<:HANDLE>, 4
@DefProto WINSOCK_API_LINKAGE, WSAAsyncSelect,           WINSTDCALLCONV, ,<:SOCKET, :HWND, :u_int, :SDWORD>, 16
@DefProto WINSOCK_API_LINKAGE, WSAAccept,                WINSTDCALLCONV, ,<:SOCKET, :ptr sockaddr, :LPINT, :LPCONDITIONPROC, :DWORD_PTR>, 20
@DefProto WINSOCK_API_LINKAGE, WSACloseEvent,          WINSTDCALLCONV, ,<:WSAEVENT>, 4
@DefProto WINSOCK_API_LINKAGE, WSAConnect,             WINSTDCALLCONV, ,<:SOCKET, :ptr sockaddr, :DWORD, :LPWSABUF, :LPWSABUF, :LPQOS, :LPQOS>, 28
@DefProto WINSOCK_API_LINKAGE, WSACreateEvent,         WINSTDCALLCONV, ,<>, 0
@DefProto WINSOCK_API_LINKAGE, WSADuplicateSocketA,    WINSTDCALLCONV, ,<:SOCKET, :DWORD, :LPWSAPROTOCOL_INFOA>, 12
@DefProto WINSOCK_API_LINKAGE, WSADuplicateSocketW,    WINSTDCALLCONV, ,<:SOCKET, :DWORD, :LPWSAPROTOCOL_INFOW>, 12
@DefProto WINSOCK_API_LINKAGE, WSAEnumNetworkEvents,   WINSTDCALLCONV, ,<:SOCKET, :WSAEVENT, :LPWSANETWORKEVENTS>, 12
@DefProto WINSOCK_API_LINKAGE, WSAEnumProtocolsA,      WINSTDCALLCONV, ,<:LPINT, :LPWSAPROTOCOL_INFOA, :LPDWORD>, 12
@DefProto WINSOCK_API_LINKAGE, WSAEnumProtocolsW,      WINSTDCALLCONV, ,<:LPINT, :LPWSAPROTOCOL_INFOW, :LPDWORD>, 12
@DefProto WINSOCK_API_LINKAGE, WSAEventSelect,         WINSTDCALLCONV, ,<:SOCKET, :WSAEVENT, :SDWORD>, 12
@DefProto WINSOCK_API_LINKAGE, WSAGetOverlappedResult, WINSTDCALLCONV, ,<:SOCKET, :LPWSAOVERLAPPED, :LPDWORD, :BOOL, :LPDWORD>, 20
@DefProto WINSOCK_API_LINKAGE, WSAGetQOSByName,        WINSTDCALLCONV, ,<:SOCKET, :LPWSABUF, :LPQOS>, 12
@DefProto WINSOCK_API_LINKAGE, WSAHtonl,               WINSTDCALLCONV, ,<:SOCKET, :u_long, :ptr u_long>, 12
@DefProto WINSOCK_API_LINKAGE, WSAHtons,               WINSTDCALLCONV, ,<:SOCKET, :DWORD, :ptr u_short>, 12
@DefProto WINSOCK_API_LINKAGE, WSAIoctl,               WINSTDCALLCONV, ,<:SOCKET, :DWORD, :LPVOID, :DWORD, :LPVOID, :DWORD, :LPDWORD, :LPWSAOVERLAPPED, :LPWSAOVERLAPPED_COMPLETION_ROUTINE>, 36
@DefProto WINSOCK_API_LINKAGE, WSAJoinLeaf,            WINSTDCALLCONV, ,<:SOCKET, :ptr sockaddr, :DWORD, :LPWSABUF, :LPWSABUF, :LPQOS, :LPQOS, :DWORD>, 32
@DefProto WINSOCK_API_LINKAGE, WSANtohl,               WINSTDCALLCONV, ,<:SOCKET, :u_long, :ptr u_long>, 12
@DefProto WINSOCK_API_LINKAGE, WSANtohs,               WINSTDCALLCONV, ,<:SOCKET, :u_short, :ptr u_short>, 12
@DefProto WINSOCK_API_LINKAGE, WSARecv,                WINSTDCALLCONV, ,<:SOCKET, :LPWSABUF, :DWORD, :LPDWORD, :LPDWORD, :LPWSAOVERLAPPED, :LPWSAOVERLAPPED_COMPLETION_ROUTINE>, 28
@DefProto WINSOCK_API_LINKAGE, WSARecvDisconnect,      WINSTDCALLCONV, ,<:SOCKET, :LPWSABUF>, 8
@DefProto WINSOCK_API_LINKAGE, WSARecvFrom,            WINSTDCALLCONV, ,<:SOCKET, :LPWSABUF, :DWORD, :LPDWORD, :LPDWORD, :ptr sockaddr, :LPINT, :LPWSAOVERLAPPED, :LPWSAOVERLAPPED_COMPLETION_ROUTINE>, 36
@DefProto WINSOCK_API_LINKAGE, WSAResetEvent,          WINSTDCALLCONV, ,<:WSAEVENT>, 4
@DefProto WINSOCK_API_LINKAGE, WSASend,                WINSTDCALLCONV, ,<:SOCKET, :LPWSABUF, :DWORD, :LPDWORD, :DWORD, :LPWSAOVERLAPPED, :LPWSAOVERLAPPED_COMPLETION_ROUTINE>, 28
@DefProto WINSOCK_API_LINKAGE, WSASendDisconnect,      WINSTDCALLCONV, ,<:SOCKET, :LPWSABUF>, 8
@DefProto WINSOCK_API_LINKAGE, WSASendTo,              WINSTDCALLCONV, ,<:SOCKET, :LPWSABUF, :DWORD, :LPDWORD, :DWORD, :ptr sockaddr, :DWORD, :LPWSAOVERLAPPED, :LPWSAOVERLAPPED_COMPLETION_ROUTINE>, 36
@DefProto WINSOCK_API_LINKAGE, WSASetEvent,            WINSTDCALLCONV, ,<:WSAEVENT>, 4
@DefProto WINSOCK_API_LINKAGE, WSASocketA,             WINSTDCALLCONV, ,<:DWORD, :DWORD, :DWORD, :LPWSAPROTOCOL_INFOA, :GROUP_, :DWORD>, 24
@DefProto WINSOCK_API_LINKAGE, WSASocketW,             WINSTDCALLCONV, ,<:DWORD, :DWORD, :DWORD, :LPWSAPROTOCOL_INFOW, :GROUP_, :DWORD>, 24
@DefProto WINSOCK_API_LINKAGE, WSAWaitForMultipleEvents, WINSTDCALLCONV, ,<:DWORD, :ptr WSAEVENT, :BOOL, :DWORD, :BOOL>, 20
@DefProto WINSOCK_API_LINKAGE, WSAAddressToStringA,      WINSTDCALLCONV, ,<:LPSOCKADDR, :DWORD, :LPWSAPROTOCOL_INFOA, :LPSTR, :LPDWORD>, 20
@DefProto WINSOCK_API_LINKAGE, WSAAddressToStringW,      WINSTDCALLCONV, ,<:LPSOCKADDR, :DWORD, :LPWSAPROTOCOL_INFOW, :LPWSTR, :LPDWORD>, 20
@DefProto WINSOCK_API_LINKAGE, WSAStringToAddressA,      WINSTDCALLCONV, ,<:LPSTR, :DWORD, :LPWSAPROTOCOL_INFOA, :LPSOCKADDR, :LPINT>, 20
@DefProto WINSOCK_API_LINKAGE, WSAStringToAddressW,      WINSTDCALLCONV, ,<:LPWSTR, :DWORD, :LPWSAPROTOCOL_INFOW, :LPSOCKADDR, :LPINT>, 20
@DefProto WINSOCK_API_LINKAGE, WSALookupServiceBeginA,   WINSTDCALLCONV, ,<:LPWSAQUERYSETA, :DWORD, :LPHANDLE>, 12
@DefProto WINSOCK_API_LINKAGE, WSALookupServiceBeginW,   WINSTDCALLCONV, ,<:LPWSAQUERYSETW, :DWORD, :LPHANDLE>, 12
@DefProto WINSOCK_API_LINKAGE, WSALookupServiceNextA,    WINSTDCALLCONV, ,<:HANDLE, :DWORD, :LPDWORD, :LPWSAQUERYSETA>, 16
@DefProto WINSOCK_API_LINKAGE, WSALookupServiceNextW,    WINSTDCALLCONV, ,<:HANDLE, :DWORD, :LPDWORD, :LPWSAQUERYSETW>, 16
@DefProto WINSOCK_API_LINKAGE, WSALookupServiceEnd,      WINSTDCALLCONV, ,<:HANDLE>, 4
@DefProto WINSOCK_API_LINKAGE, WSAInstallServiceClassA,  WINSTDCALLCONV, ,<:LPWSASERVICECLASSINFOA>, 4
@DefProto WINSOCK_API_LINKAGE, WSAInstallServiceClassW,  WINSTDCALLCONV, ,<:LPWSASERVICECLASSINFOW>, 4
@DefProto WINSOCK_API_LINKAGE, WSARemoveServiceClass,    WINSTDCALLCONV, ,<:LPGUID>, 4
@DefProto WINSOCK_API_LINKAGE, WSAGetServiceClassInfoA,  WINSTDCALLCONV, ,<:LPGUID, :LPGUID, :LPDWORD, :LPWSASERVICECLASSINFOA>, 16
@DefProto WINSOCK_API_LINKAGE, WSAGetServiceClassInfoW,  WINSTDCALLCONV, ,<:LPGUID, :LPGUID, :LPDWORD, :LPWSASERVICECLASSINFOW>, 16
@DefProto WINSOCK_API_LINKAGE, WSAEnumNameSpaceProvidersA,       WINSTDCALLCONV, ,<:LPDWORD, :LPWSANAMESPACE_INFOA>, 12
@DefProto WINSOCK_API_LINKAGE, WSAEnumNameSpaceProvidersW,       WINSTDCALLCONV, ,<:LPDWORD, :LPWSANAMESPACE_INFOW>, 12
@DefProto WINSOCK_API_LINKAGE, WSAGetServiceClassNameByClassIdA, WINSTDCALLCONV, ,<:LPGUID, :LPSTR, :LPDWORD>, 12
@DefProto WINSOCK_API_LINKAGE, WSAGetServiceClassNameByClassIdW, WINSTDCALLCONV, ,<:LPGUID, :LPWSTR, :LPDWORD>, 12
@DefProto WINSOCK_API_LINKAGE, WSASetServiceA,          WINSTDCALLCONV, ,<:LPWSAQUERYSETA, :WSAESETSERVICEOP, :DWORD>, 12
@DefProto WINSOCK_API_LINKAGE, WSASetServiceW,          WINSTDCALLCONV, ,<:LPWSAQUERYSETW, :WSAESETSERVICEOP, :DWORD>, 12
@DefProto WINSOCK_API_LINKAGE, WSAProviderConfigChange, WINSTDCALLCONV, ,<:LPHANDLE, :LPWSAOVERLAPPED, :LPWSAOVERLAPPED_COMPLETION_ROUTINE>, 12

ifdef UNICODE
WSADuplicateSocket              EQU <WSADuplicateSocketW>
WSAEnumProtocols                EQU <WSAEnumProtocolsW>
WSASocket                       EQU <WSASocketW>
WSAAddressToString              EQU <WSAAddressToStringW>
WSAStringToAddress              EQU <WSAStringToAddressW>
WSALookupServiceBegin           EQU <WSALookupServiceBeginW>
WSALookupServiceNext            EQU <WSALookupServiceNextW>
WSAInstallServiceClass          EQU <WSAInstallServiceClassW>
WSAGetServiceClassInfo          EQU <WSAGetServiceClassInfoW>
WSAEnumNameSpaceProviders       EQU <WSAEnumNameSpaceProvidersW>
WSAGetServiceClassNameByClassId EQU <WSAGetServiceClassNameByClassIdW>
WSASetService                   EQU <WSASetServiceW>
else 
WSADuplicateSocket              EQU <WSADuplicateSocketA>
WSAEnumProtocols                EQU <WSAEnumProtocolsA>
WSASocket                       EQU <WSASocketA>
WSAAddressToString              EQU <WSAAddressToStringA>
WSAStringToAddress              EQU <WSAStringToAddressA>
WSALookupServiceBegin           EQU <WSALookupServiceBeginA>
WSALookupServiceNext            EQU <WSALookupServiceNextA>
WSAInstallServiceClass          EQU <WSAInstallServiceClassA>
WSAGetServiceClassInfo          EQU <WSAGetServiceClassInfoA>
WSAEnumNameSpaceProviders       EQU <WSAEnumNameSpaceProvidersA>
WSAGetServiceClassNameByClassId EQU <WSAGetServiceClassNameByClassIdA>
WSASetService                   EQU <WSASetServiceA>
endif 

endif 

if INCL_WINSOCK_API_TYPEDEFS
proto_LPFN_ACCEPT typedef proto WINSTDCALLCONV :SOCKET,:ptr sockaddr,:ptr DWORD
LPFN_ACCEPT typedef ptr proto_LPFN_ACCEPT
proto_LPFN_BIND   typedef proto WINSTDCALLCONV :SOCKET,:ptr sockaddr,:DWORD
LPFN_BIND typedef ptr proto_LPFN_BIND
proto_LPFN_CLOSESOCKET typedef proto WINSTDCALLCONV :SOCKET
LPFN_CLOSESOCKET typedef ptr proto_LPFN_CLOSESOCKET
proto_LPFN_CONNECT typedef proto WINSTDCALLCONV :SOCKET,:ptr sockaddr,:DWORD
LPFN_CONNECT typedef ptr proto_LPFN_CONNECT
proto_LPFN_IOCTLSOCKET typedef proto WINSTDCALLCONV :SOCKET,:SDWORD,:ptr u_long
LPFN_IOCTLSOCKET typedef ptr proto_LPFN_IOCTLSOCKET
proto_LPFN_GETPEERNAME typedef proto WINSTDCALLCONV :SOCKET,:ptr sockaddr,:ptr DWORD
LPFN_GETPEERNAME typedef ptr proto_LPFN_GETPEERNAME
proto_LPFN_GETSOCKNAME typedef proto WINSTDCALLCONV :SOCKET,:ptr sockaddr,:ptr DWORD
LPFN_GETSOCKNAME typedef ptr proto_LPFN_GETSOCKNAME
proto_LPFN_GETSOCKOPT typedef proto WINSTDCALLCONV :SOCKET,:DWORD,:DWORD,:ptr SBYTE,:ptr DWORD
LPFN_GETSOCKOPT typedef ptr proto_LPFN_GETSOCKOPT
proto_LPFN_HTONL typedef proto WINSTDCALLCONV :u_long
LPFN_HTONL typedef ptr proto_LPFN_HTONL
proto_LPFN_HTONS typedef proto WINSTDCALLCONV :DWORD
LPFN_HTONS typedef ptr proto_LPFN_HTONS
proto_LPFN_INET_ADDR typedef proto WINSTDCALLCONV :ptr SBYTE
LPFN_INET_ADDR typedef ptr proto_LPFN_INET_ADDR
proto_LPFN_INET_NTOA typedef proto WINSTDCALLCONV :in_addr
LPFN_INET_NTOA typedef ptr proto_LPFN_INET_NTOA
proto_LPFN_LISTEN typedef proto WINSTDCALLCONV :SOCKET,:DWORD
LPFN_LISTEN typedef ptr proto_LPFN_LISTEN
proto_LPFN_NTOHL typedef proto WINSTDCALLCONV :u_long
LPFN_NTOHL typedef ptr proto_LPFN_NTOHL
proto_LPFN_NTOHS typedef proto WINSTDCALLCONV :u_short
LPFN_NTOHS typedef ptr proto_LPFN_NTOHS
proto_LPFN_RECV typedef proto WINSTDCALLCONV :SOCKET,:ptr SBYTE,:DWORD,:DWORD
LPFN_RECV typedef ptr proto_LPFN_RECV
proto_LPFN_RECVFROM typedef proto WINSTDCALLCONV :SOCKET,:ptr SBYTE,:DWORD,:DWORD,:ptr sockaddr,:ptr DWORD
LPFN_RECVFROM typedef ptr proto_LPFN_RECVFROM
proto_LPFN_SELECT typedef proto WINSTDCALLCONV :DWORD,:ptr fd_set,:ptr fd_set,:ptr fd_set,:ptr timeval
LPFN_SELECT typedef ptr proto_LPFN_SELECT
proto_LPFN_SEND typedef proto WINSTDCALLCONV :SOCKET,:ptr SBYTE,:DWORD,:DWORD
LPFN_SEND typedef ptr proto_LPFN_SEND
proto_LPFN_SENDTO typedef proto WINSTDCALLCONV :SOCKET,:ptr SBYTE,:DWORD,:DWORD,:ptr sockaddr,:DWORD
LPFN_SENDTO typedef ptr proto_LPFN_SENDTO
proto_LPFN_SETSOCKOPT typedef proto WINSTDCALLCONV :SOCKET,:DWORD,:DWORD,:ptr SBYTE,:DWORD
LPFN_SETSOCKOPT typedef ptr proto_LPFN_SETSOCKOPT
proto_LPFN_SHUTDOWN typedef proto WINSTDCALLCONV :SOCKET,:DWORD
LPFN_SHUTDOWN typedef ptr proto_LPFN_SHUTDOWN
proto_LPFN_SOCKET typedef proto WINSTDCALLCONV :DWORD,:DWORD,:DWORD
LPFN_SOCKET typedef ptr proto_LPFN_SOCKET
;--- missing gethostbyaddr
;--- missing gethostbyname
proto_LPFN_GETHOSTNAME typedef proto WINSTDCALLCONV :ptr SBYTE,:DWORD
LPFN_GETHOSTNAME typedef ptr proto_LPFN_GETHOSTNAME
;--- missing getservbyport
;--- missing getservbyname
;--- missing getprotobynumber
;--- missing getprotobyname
proto_LPFN_WSASTARTUP typedef proto WINSTDCALLCONV :WORD,:LPWSADATA
LPFN_WSASTARTUP typedef ptr proto_LPFN_WSASTARTUP
proto_LPFN_WSACLEANUP typedef proto WINSTDCALLCONV 
LPFN_WSACLEANUP typedef ptr proto_LPFN_WSACLEANUP
proto_LPFN_WSASETLASTERROR typedef proto WINSTDCALLCONV :DWORD
LPFN_WSASETLASTERROR typedef ptr proto_LPFN_WSASETLASTERROR
proto_LPFN_WSAGETLASTERROR typedef proto WINSTDCALLCONV 
LPFN_WSAGETLASTERROR typedef ptr proto_LPFN_WSAGETLASTERROR
proto_LPFN_WSAISBLOCKING typedef proto WINSTDCALLCONV 
LPFN_WSAISBLOCKING typedef ptr proto_LPFN_WSAISBLOCKING
proto_LPFN_WSAUNHOOKBLOCKINGHOOK typedef proto WINSTDCALLCONV 
LPFN_WSAUNHOOKBLOCKINGHOOK typedef ptr proto_LPFN_WSAUNHOOKBLOCKINGHOOK
proto_LPFN_WSASETBLOCKINGHOOK typedef proto WINSTDCALLCONV :FARPROC
LPFN_WSASETBLOCKINGHOOK typedef ptr proto_LPFN_WSASETBLOCKINGHOOK
proto_LPFN_WSACANCELBLOCKINGCALL typedef proto WINSTDCALLCONV 
LPFN_WSACANCELBLOCKINGCALL typedef ptr proto_LPFN_WSACANCELBLOCKINGCALL
proto_LPFN_WSAASYNCGETSERVBYNAME typedef proto WINSTDCALLCONV :HWND,:u_int,:ptr SBYTE,:ptr SBYTE,:ptr SBYTE,:DWORD
LPFN_WSAASYNCGETSERVBYNAME typedef ptr proto_LPFN_WSAASYNCGETSERVBYNAME
proto_LPFN_WSAASYNCGETSERVBYPORT typedef proto WINSTDCALLCONV :HWND,:u_int,:DWORD,:ptr SBYTE,:ptr SBYTE,:DWORD
LPFN_WSAASYNCGETSERVBYPORT typedef ptr proto_LPFN_WSAASYNCGETSERVBYPORT
proto_LPFN_WSAASYNCGETPROTOBYNAME typedef proto WINSTDCALLCONV :HWND,:u_int,:ptr SBYTE,:ptr SBYTE,:DWORD
LPFN_WSAASYNCGETPROTOBYNAME typedef ptr proto_LPFN_WSAASYNCGETPROTOBYNAME
proto_LPFN_WSAASYNCGETPROTOBYNUMBER typedef proto WINSTDCALLCONV :HWND,:u_int,:DWORD,:ptr SBYTE,:DWORD
LPFN_WSAASYNCGETPROTOBYNUMBER typedef ptr proto_LPFN_WSAASYNCGETPROTOBYNUMBER
proto_LPFN_WSAASYNCGETHOSTBYNAME typedef proto WINSTDCALLCONV :HWND,:u_int,:ptr SBYTE,:ptr SBYTE,:DWORD
LPFN_WSAASYNCGETHOSTBYNAME typedef ptr proto_LPFN_WSAASYNCGETHOSTBYNAME
proto_LPFN_WSAASYNCGETHOSTBYADDR typedef proto WINSTDCALLCONV :HWND,:u_int,:ptr SBYTE,:DWORD,:DWORD,:ptr SBYTE,:DWORD
LPFN_WSAASYNCGETHOSTBYADDR typedef ptr proto_LPFN_WSAASYNCGETHOSTBYADDR
proto_LPFN_WSACANCELASYNCREQUEST typedef proto WINSTDCALLCONV :HANDLE
LPFN_WSACANCELASYNCREQUEST typedef ptr proto_LPFN_WSACANCELASYNCREQUEST
proto_LPFN_WSAASYNCSELECT typedef proto WINSTDCALLCONV :SOCKET,:HWND,:u_int,:SDWORD
LPFN_WSAASYNCSELECT typedef ptr proto_LPFN_WSAASYNCSELECT
proto_LPFN_WSAACCEPT typedef proto WINSTDCALLCONV :SOCKET,:ptr sockaddr,:LPINT,:LPCONDITIONPROC,:DWORD_PTR
LPFN_WSAACCEPT typedef ptr proto_LPFN_WSAACCEPT
proto_LPFN_WSACLOSEEVENT typedef proto WINSTDCALLCONV :WSAEVENT
LPFN_WSACLOSEEVENT typedef ptr proto_LPFN_WSACLOSEEVENT
proto_LPFN_WSACONNECT typedef proto WINSTDCALLCONV :SOCKET,:ptr sockaddr,:DWORD,:LPWSABUF,:LPWSABUF,:LPQOS,:LPQOS
LPFN_WSACONNECT typedef ptr proto_LPFN_WSACONNECT
proto_LPFN_WSACREATEEVENT typedef proto WINSTDCALLCONV 
LPFN_WSACREATEEVENT typedef ptr proto_LPFN_WSACREATEEVENT
proto_LPFN_WSADUPLICATESOCKETA typedef proto WINSTDCALLCONV :SOCKET,:DWORD,:LPWSAPROTOCOL_INFOA
LPFN_WSADUPLICATESOCKETA typedef ptr proto_LPFN_WSADUPLICATESOCKETA
proto_LPFN_WSADUPLICATESOCKETW typedef proto WINSTDCALLCONV :SOCKET,:DWORD,:LPWSAPROTOCOL_INFOW
LPFN_WSADUPLICATESOCKETW typedef ptr proto_LPFN_WSADUPLICATESOCKETW
proto_LPFN_WSAENUMNETWORKEVENTS typedef proto WINSTDCALLCONV :SOCKET,:WSAEVENT,:LPWSANETWORKEVENTS
LPFN_WSAENUMNETWORKEVENTS typedef ptr proto_LPFN_WSAENUMNETWORKEVENTS
proto_LPFN_WSAENUMPROTOCOLSA typedef proto WINSTDCALLCONV :LPINT,:LPWSAPROTOCOL_INFOA,:LPDWORD
LPFN_WSAENUMPROTOCOLSA typedef ptr proto_LPFN_WSAENUMPROTOCOLSA
proto_LPFN_WSAENUMPROTOCOLSW typedef proto WINSTDCALLCONV :LPINT,:LPWSAPROTOCOL_INFOW,:LPDWORD
LPFN_WSAENUMPROTOCOLSW typedef ptr proto_LPFN_WSAENUMPROTOCOLSW
proto_LPFN_WSAEVENTSELECT typedef proto WINSTDCALLCONV :SOCKET,:WSAEVENT,:SDWORD
LPFN_WSAEVENTSELECT typedef ptr proto_LPFN_WSAEVENTSELECT
proto_LPFN_WSAGETOVERLAPPEDRESULT typedef proto WINSTDCALLCONV :SOCKET,:LPWSAOVERLAPPED,:LPDWORD,:BOOL,:LPDWORD
LPFN_WSAGETOVERLAPPEDRESULT typedef ptr proto_LPFN_WSAGETOVERLAPPEDRESULT
proto_LPFN_WSAGETQOSBYNAME typedef proto WINSTDCALLCONV :SOCKET,:LPWSABUF,:LPQOS
LPFN_WSAGETQOSBYNAME typedef ptr proto_LPFN_WSAGETQOSBYNAME
proto_LPFN_WSAHTONL typedef proto WINSTDCALLCONV :SOCKET,:u_long,:ptr u_long
LPFN_WSAHTONL typedef ptr proto_LPFN_WSAHTONL
proto_LPFN_WSAHTONS typedef proto WINSTDCALLCONV :SOCKET,:u_short,:ptr u_short
LPFN_WSAHTONS typedef ptr proto_LPFN_WSAHTONS
proto_LPFN_WSAIOCTL typedef proto WINSTDCALLCONV :SOCKET,:DWORD,:LPVOID,:DWORD,:LPVOID,:DWORD,:LPDWORD,:LPWSAOVERLAPPED,:LPWSAOVERLAPPED_COMPLETION_ROUTINE
LPFN_WSAIOCTL typedef ptr proto_LPFN_WSAIOCTL
proto_LPFN_WSAJOINLEAF typedef proto WINSTDCALLCONV :SOCKET,:ptr sockaddr,:DWORD,:LPWSABUF,:LPWSABUF,:LPQOS,:LPQOS,:DWORD
LPFN_WSAJOINLEAF typedef ptr proto_LPFN_WSAJOINLEAF
proto_LPFN_WSANTOHL typedef proto WINSTDCALLCONV :SOCKET,:u_long,:ptr u_long
LPFN_WSANTOHL typedef ptr proto_LPFN_WSANTOHL
proto_LPFN_WSANTOHS typedef proto WINSTDCALLCONV :SOCKET,:u_short,:ptr u_short
LPFN_WSANTOHS typedef ptr proto_LPFN_WSANTOHS
proto_LPFN_WSARECV typedef proto WINSTDCALLCONV :SOCKET,:LPWSABUF,:DWORD,:LPDWORD,:LPDWORD,:LPWSAOVERLAPPED,:LPWSAOVERLAPPED_COMPLETION_ROUTINE
LPFN_WSARECV typedef ptr proto_LPFN_WSARECV
proto_LPFN_WSARECVDISCONNECT typedef proto WINSTDCALLCONV :SOCKET,:LPWSABUF
LPFN_WSARECVDISCONNECT typedef ptr proto_LPFN_WSARECVDISCONNECT
proto_LPFN_WSARECVFROM typedef proto WINSTDCALLCONV :SOCKET,:LPWSABUF,:DWORD,:LPDWORD,:LPDWORD,:ptr sockaddr,:LPINT,:LPWSAOVERLAPPED,:LPWSAOVERLAPPED_COMPLETION_ROUTINE
LPFN_WSARECVFROM typedef ptr proto_LPFN_WSARECVFROM
proto_LPFN_WSARESETEVENT typedef proto WINSTDCALLCONV :WSAEVENT
LPFN_WSARESETEVENT typedef ptr proto_LPFN_WSARESETEVENT
proto_LPFN_WSASEND typedef proto WINSTDCALLCONV :SOCKET,:LPWSABUF,:DWORD,:LPDWORD,:DWORD,:LPWSAOVERLAPPED,:LPWSAOVERLAPPED_COMPLETION_ROUTINE
LPFN_WSASEND typedef ptr proto_LPFN_WSASEND
proto_LPFN_WSASENDDISCONNECT typedef proto WINSTDCALLCONV :SOCKET,:LPWSABUF
LPFN_WSASENDDISCONNECT typedef ptr proto_LPFN_WSASENDDISCONNECT
proto_LPFN_WSASENDTO typedef proto WINSTDCALLCONV :SOCKET,:LPWSABUF,:DWORD,:LPDWORD,:DWORD,:ptr sockaddr,:DWORD,:LPWSAOVERLAPPED,:LPWSAOVERLAPPED_COMPLETION_ROUTINE
LPFN_WSASENDTO typedef ptr proto_LPFN_WSASENDTO
proto_LPFN_WSASETEVENT typedef proto WINSTDCALLCONV :WSAEVENT
LPFN_WSASETEVENT typedef ptr proto_LPFN_WSASETEVENT
proto_LPFN_WSASOCKETA typedef proto WINSTDCALLCONV :DWORD,:DWORD,:DWORD,:LPWSAPROTOCOL_INFOA,:GROUP_,:DWORD
LPFN_WSASOCKETA typedef ptr proto_LPFN_WSASOCKETA
proto_LPFN_WSASOCKETW typedef proto WINSTDCALLCONV :DWORD,:DWORD,:DWORD,:LPWSAPROTOCOL_INFOW,:GROUP_,:DWORD
LPFN_WSASOCKETW typedef ptr proto_LPFN_WSASOCKETW
proto_LPFN_WSAWAITFORMULTIPLEEVENTS typedef proto WINSTDCALLCONV :DWORD,:ptr WSAEVENT,:BOOL,:DWORD,:BOOL
LPFN_WSAWAITFORMULTIPLEEVENTS typedef ptr proto_LPFN_WSAWAITFORMULTIPLEEVENTS
proto_LPFN_WSAADDRESSTOSTRINGA typedef proto WINSTDCALLCONV :LPSOCKADDR,:DWORD,:LPWSAPROTOCOL_INFOA,:LPSTR,:LPDWORD
LPFN_WSAADDRESSTOSTRINGA typedef ptr proto_LPFN_WSAADDRESSTOSTRINGA
proto_LPFN_WSAADDRESSTOSTRINGW typedef proto WINSTDCALLCONV :LPSOCKADDR,:DWORD,:LPWSAPROTOCOL_INFOW,:LPWSTR,:LPDWORD
LPFN_WSAADDRESSTOSTRINGW typedef ptr proto_LPFN_WSAADDRESSTOSTRINGW
proto_LPFN_WSASTRINGTOADDRESSA typedef proto WINSTDCALLCONV :LPSTR,:DWORD,:LPWSAPROTOCOL_INFOA,:LPSOCKADDR,:LPINT
LPFN_WSASTRINGTOADDRESSA typedef ptr proto_LPFN_WSASTRINGTOADDRESSA
proto_LPFN_WSASTRINGTOADDRESSW typedef proto WINSTDCALLCONV :LPWSTR,:DWORD,:LPWSAPROTOCOL_INFOW,:LPSOCKADDR,:LPINT
LPFN_WSASTRINGTOADDRESSW typedef ptr proto_LPFN_WSASTRINGTOADDRESSW
proto_LPFN_WSALOOKUPSERVICEBEGINA typedef proto WINSTDCALLCONV :LPWSAQUERYSETA,:DWORD,:LPHANDLE
LPFN_WSALOOKUPSERVICEBEGINA typedef ptr proto_LPFN_WSALOOKUPSERVICEBEGINA
proto_LPFN_WSALOOKUPSERVICEBEGINW typedef proto WINSTDCALLCONV :LPWSAQUERYSETW,:DWORD,:LPHANDLE
LPFN_WSALOOKUPSERVICEBEGINW typedef ptr proto_LPFN_WSALOOKUPSERVICEBEGINW
proto_LPFN_WSALOOKUPSERVICENEXTA typedef proto WINSTDCALLCONV :HANDLE,:DWORD,:LPDWORD,:LPWSAQUERYSETA
LPFN_WSALOOKUPSERVICENEXTA typedef ptr proto_LPFN_WSALOOKUPSERVICENEXTA
proto_LPFN_WSALOOKUPSERVICENEXTW typedef proto WINSTDCALLCONV :HANDLE,:DWORD,:LPDWORD,:LPWSAQUERYSETW
LPFN_WSALOOKUPSERVICENEXTW typedef ptr proto_LPFN_WSALOOKUPSERVICENEXTW
proto_LPFN_WSALOOKUPSERVICEEND typedef proto WINSTDCALLCONV :HANDLE
LPFN_WSALOOKUPSERVICEEND typedef ptr proto_LPFN_WSALOOKUPSERVICEEND
proto_LPFN_WSAINSTALLSERVICECLASSA typedef proto WINSTDCALLCONV :LPWSASERVICECLASSINFOA
LPFN_WSAINSTALLSERVICECLASSA typedef ptr proto_LPFN_WSAINSTALLSERVICECLASSA
proto_LPFN_WSAINSTALLSERVICECLASSW typedef proto WINSTDCALLCONV :LPWSASERVICECLASSINFOW
LPFN_WSAINSTALLSERVICECLASSW typedef ptr proto_LPFN_WSAINSTALLSERVICECLASSW
proto_LPFN_WSAREMOVESERVICECLASS typedef proto WINSTDCALLCONV :LPGUID
LPFN_WSAREMOVESERVICECLASS typedef ptr proto_LPFN_WSAREMOVESERVICECLASS
proto_LPFN_WSAGETSERVICECLASSINFOA typedef proto WINSTDCALLCONV :LPGUID,:LPGUID,:LPDWORD,:LPWSASERVICECLASSINFOA
LPFN_WSAGETSERVICECLASSINFOA typedef ptr proto_LPFN_WSAGETSERVICECLASSINFOA
proto_LPFN_WSAGETSERVICECLASSINFOW typedef proto WINSTDCALLCONV :LPGUID,:LPGUID,:LPDWORD,:LPWSASERVICECLASSINFOW
LPFN_WSAGETSERVICECLASSINFOW typedef ptr proto_LPFN_WSAGETSERVICECLASSINFOW
proto_LPFN_WSAENUMNAMESPACEPROVIDERSA typedef proto WINSTDCALLCONV :LPDWORD,:LPWSANAMESPACE_INFOA
LPFN_WSAENUMNAMESPACEPROVIDERSA typedef ptr proto_LPFN_WSAENUMNAMESPACEPROVIDERSA
proto_LPFN_WSAENUMNAMESPACEPROVIDERSW typedef proto WINSTDCALLCONV :LPDWORD,:LPWSANAMESPACE_INFOW
LPFN_WSAENUMNAMESPACEPROVIDERSW typedef ptr proto_LPFN_WSAENUMNAMESPACEPROVIDERSW
proto_LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDA typedef proto WINSTDCALLCONV :LPGUID,:LPSTR,:LPDWORD
LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDA typedef ptr proto_LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDA
proto_LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDW typedef proto WINSTDCALLCONV :LPGUID,:LPWSTR,:LPDWORD
LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDW typedef ptr proto_LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDW
proto_LPFN_WSASETSERVICEA typedef proto WINSTDCALLCONV :LPWSAQUERYSETA,:WSAESETSERVICEOP,:DWORD
LPFN_WSASETSERVICEA typedef ptr proto_LPFN_WSASETSERVICEA
proto_LPFN_WSASETSERVICEW typedef proto WINSTDCALLCONV :LPWSAQUERYSETW,:WSAESETSERVICEOP,:DWORD
LPFN_WSASETSERVICEW typedef ptr proto_LPFN_WSASETSERVICEW
proto_LPFN_WSAPROVIDERCONFIGCHANGE typedef proto WINSTDCALLCONV :LPHANDLE,:LPWSAOVERLAPPED,:LPWSAOVERLAPPED_COMPLETION_ROUTINE
LPFN_WSAPROVIDERCONFIGCHANGE typedef ptr proto_LPFN_WSAPROVIDERCONFIGCHANGE

ifdef UNICODE
LPFN_WSADUPLICATESOCKET     EQU <LPFN_WSADUPLICATESOCKETW>
LPFN_WSAENUMPROTOCOLS       EQU <LPFN_WSAENUMPROTOCOLSW>
LPFN_WSASOCKET              EQU <LPFN_WSASOCKETW>
LPFN_WSAADDRESSTOSTRING     EQU <LPFN_WSAADDRESSTOSTRINGW>
LPFN_WSASTRINGTOADDRESS     EQU <LPFN_WSASTRINGTOADDRESSW>
LPFN_WSALOOKUPSERVICEBEGIN  EQU <LPFN_WSALOOKUPSERVICEBEGINW>
LPFN_WSALOOKUPSERVICENEXT   EQU <LPFN_WSALOOKUPSERVICENEXTW>
LPFN_WSAINSTALLSERVICECLASS EQU <LPFN_WSAINSTALLSERVICECLASSW>
LPFN_WSAGETSERVICECLASSINFO EQU <LPFN_WSAGETSERVICECLASSINFOW>
LPFN_WSAENUMNAMESPACEPROVIDERS       EQU <LPFN_WSAENUMNAMESPACEPROVIDERSW>
LPFN_WSAGETSERVICECLASSNAMEBYCLASSID EQU <LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDW>
LPFN_WSASETSERVICE          EQU <LPFN_WSASETSERVICEW>
else 
LPFN_WSADUPLICATESOCKET     EQU <LPFN_WSADUPLICATESOCKETA>
LPFN_WSAENUMPROTOCOLS       EQU <LPFN_WSAENUMPROTOCOLSA>
LPFN_WSASOCKET              EQU <LPFN_WSASOCKETA>
LPFN_WSAADDRESSTOSTRING     EQU <LPFN_WSAADDRESSTOSTRINGA>
LPFN_WSASTRINGTOADDRESS     EQU <LPFN_WSASTRINGTOADDRESSA>
LPFN_WSALOOKUPSERVICEBEGIN  EQU <LPFN_WSALOOKUPSERVICEBEGINA>
LPFN_WSALOOKUPSERVICENEXT   EQU <LPFN_WSALOOKUPSERVICENEXTA>
LPFN_WSAINSTALLSERVICECLASS EQU <LPFN_WSAINSTALLSERVICECLASSA>
LPFN_WSAGETSERVICECLASSINFO EQU <LPFN_WSAGETSERVICECLASSINFOA>
LPFN_WSAENUMNAMESPACEPROVIDERS       EQU <LPFN_WSAENUMNAMESPACEPROVIDERSA>
LPFN_WSAGETSERVICECLASSNAMEBYCLASSID EQU <LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDA>
LPFN_WSASETSERVICE          EQU <LPFN_WSASETSERVICEA>
endif 

endif 

SOCKADDR_IN   typedef sockaddr_in
PSOCKADDR_IN  typedef ptr sockaddr_in
LPSOCKADDR_IN typedef ptr sockaddr_in

LINGER   typedef linger
PLINGER  typedef ptr linger
LPLINGER typedef ptr linger

IN_ADDR   typedef in_addr
PIN_ADDR  typedef ptr in_addr
LPIN_ADDR typedef ptr in_addr

;;FD_SET typedef fd_set
PFD_SET  typedef ptr fd_set
LPFD_SET typedef ptr fd_set

HOSTENT   typedef hostent
PHOSTENT  typedef ptr hostent
LPHOSTENT typedef ptr hostent

SERVENT   typedef servent
PSERVENT  typedef ptr servent
LPSERVENT typedef ptr servent

PROTOENT   typedef protoent
PPROTOENT  typedef ptr protoent
LPPROTOENT typedef ptr protoent

TIMEVAL   typedef timeval
PTIMEVAL  typedef ptr timeval
LPTIMEVAL typedef ptr timeval

WSAMAKEASYNCREPLY macro buflen,error
	exitm <MAKELONG ( buflen , error ) >
	endm
WSAMAKESELECTREPLY macro event,error
	exitm <MAKELONG ( event , error ) >
	endm
WSAGETASYNCBUFLEN macro lParam
	exitm <LOWORD ( lParam ) >
	endm
WSAGETASYNCERROR macro lParam
	exitm <HIWORD ( lParam ) >
	endm
WSAGETSELECTEVENT macro lParam
	exitm <LOWORD ( lParam ) >
	endm
WSAGETSELECTERROR macro lParam
	exitm <HIWORD ( lParam ) >
	endm

ifdef __cplusplus
;}
endif 

if not defined(WIN32) and not defined(_WIN64)
	include poppack.inc
endif

endif 

;--- warnings: 1
;--- errors: 0
;--- end of file ---
